#include <iostream>
#include <cstring>

using namespace std;

string s;
int main()
{
    cin >> s;
    int cnt = 1 , sum = 0;
    for (int i = 0; i < s.size() - 1; i++) // 最后一位不要参与
    {
        if (s[i] != '-')
        {
            sum += (s[i] - '0') * cnt;
            cnt++;
        }
    }
    sum %= 11;
    if(sum == 10 && s.back() == 'X') cout << "Right" << endl;
    else if(s.back() - '0' == sum) cout << "Right" << endl;
    else
    {
        if(sum == 10) s[12] = 'X';
        else s[12] = sum + '0';
        cout << s << endl;
    }
    return 0;
}